home *** CD-ROM | disk | FTP | other *** search
/ HyperPC 2 / HyperPC 2 - Disc 1.iso / 18_厳選!オンラインソフト130 / セレクション / wavgp13c.lzh / wg / dllsrc.lzh / wavdata.h < prev    next >
C/C++ Source or Header  |  1999-04-05  |  1KB  |  36 lines

  1. #ifndef wavData_h
  2. #define wavData_h
  3.  
  4. #include <windows.h>
  5.  
  6. #define Samplingrate_1  8000
  7. #define Samplingrate_2  11025
  8. #define Samplingrate_3  12000
  9. #define Samplingrate_4  16000
  10. #define Samplingrate_5  22050
  11. #define Samplingrate_6  24000
  12. #define Samplingrate_7  32000
  13. #define Samplingrate_8  44100
  14. #define Samplingrate_9  48000
  15.  
  16. // WAVEファイルの入出力を行うクラス
  17. class EXIMPORT WaveData {
  18.   public:
  19.     WaveData();
  20.     virtual ~WaveData();
  21.     bool Read(char far* FileName);
  22.     bool Write(char far* FileName);
  23.     bool DeleteData(UINT N);
  24.     bool Make(UINT n,WORD b = 8,WORD ch = 1,UINT samplePerSec = Samplingrate_2);
  25.     int DataRead(UINT n,WORD channel);
  26.     void DataWrite(UINT n,WORD channel,int d);
  27.  
  28.     void *data;
  29.     UINT NumberOfData;       // データの数
  30.     UINT NumberOfDataPerSec; // 1秒当たりのデータ数 (サンプリングレート)
  31.     WORD NumberOfChannels;   // モノラル(1) ステレオ(2)
  32.     WORD bit;                // サンプル当たりのビット数 (8 or 16 bit)
  33. };
  34.  
  35. #endif
  36.